/*
 * Copyright (c) 2006-2021, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2024-07-08     huan       the first version
 */
#ifndef APPLICATIONS_HW_INCLUDE_KEY_H_
#define APPLICATIONS_HW_INCLUDE_KEY_H_

#include <rtthread.h>

#define KEY_UP      (0x01 << 0)
#define KEY_DOWN    (0x01 << 1)
#define KEY_LEFT    (0x01 << 2)
#define KEY_RIGHT   (0x01 << 3)

typedef struct
{
    uint32_t state;
    rt_sem_t sem_tx;
    rt_sem_t sem_rx;
} Key_HandleTypedef;
extern Key_HandleTypedef Key_Handle;

void key_task(void* parameter);

#endif /* APPLICATIONS_HW_INCLUDE_KEY_H_ */
